package models

import "tuowei.com/common/models"

type SysErrorRecord struct {
	models.Model
	StudentId      int    `json:"student_id" gorm:"type:int(10);comment:学员ID"`
	ExId           int    `json:"ex_id" gorm:"int(10);comment:题库ID"`
	LinkType       int    `json:"link_type" gorm:"tinyint(1);comment:关联ID 1-网课 2-练习题 3-试卷"`
	LinkId         int    `json:"link_id" gorm:"int(5);comment:关联ID"`
	SubjectType    string `json:"subject_type" gorm:"varchar(20);comment:题目题型"`
	ErrorFrequency uint32 `json:"error_frequency" gorm:"smallint(5);comment:错误次数"`
	models.ModelTime
}

func (SysErrorRecord) TableName() string {
	return "sys_error_record"
}

type ErrorRecordList struct {
	models.Model
	ExId           int    `json:"ex_id" comment:"练习题ID"`
	Status         int    `json:"status"`
	ExType         int    `json:"ex_type"  comment:"所属练习错误记录类型"`
	SubjectType    string `json:"subject_type" gorm:"varchar(20);comment:题目题型"`
	LinkTitle      string `json:"link_title" comment:"错误记录标题" gorm:"-"`
	Content        string `json:"content" comment:"题目名称"`
	Answer         string `json:"answer" comment:"题目答案"`
	CorrectAnswer  string `json:"correct_answer" comment:"正确答案"`
	SelectedAnswer string `json:"selected_answer"`
	Analysis       string `json:"analysis" comment:"题目解析"`
	LinkId         int    `json:"link_id" comment:"关联ID"`
}
